====== VST's Not Allowed! ======

{{ http://static.flickr.com/105/309416761_7f34ea7447_m.jpg}}"Sometimes I feel like I've got hands-on control of one of the most advanced virtual syths ever made; 
Apply a 5 point tracking generator to a slow moving LFO's triangle waveshape, warping its modulation which is applied in reverse polarity to two oscillator's frequencies and is also modulating a random waveform of another LFO which is applied 100% to the filters resonance and 
25% to it's cutoff frequency... This is no virtual synth. This is a 20 year old Oberheim Matrix 1000 and my hand built knobby programmer... oh what filthy porn is this?"

--Patrick Manderson, October 2006

Chaos MatrixBox is a control surface programmer for my Oberheim Matrix 1000 analog synth module. I'm currently finishing the last bit of front panel components including the 64k ROM board that will hold all of the Matrix's 1000 patches (more on why later) as well as writing the software in C for a PIC 18F452 microcontroller using the [[http://www.ucapps.de/mios_c.html|MIOS]] operating system. I hope to begin designing the aluminum front panel in [[http://www.frontpanelexpress.com/home/index.htm|Front Panel Designer]] soon. 

For now, everything is being mounted inside 2 cardboard boxes which make great cases for prototyping without expense. 1 handy exacto knife is all you need to cut the holes and I would recommend using transparent shipping tape to reinforce the folds before they begin to wear out.

More photos can be seen at flickr: http://www.flickr.com/photos/19562549@N00/

*Updates to this page are still being made.

====== More about the Matrix ======

The Matrix is a real life, digitally controlled analog synthesizer utilizing Curtis CEM3396 chips for sound. The Matrix was way ahead of it's time allowing the user to modulate anything by anything else via software using the computers of the day.

The Oberheim Matrix 1000 analog synth module specifications are:

{{http://static.flickr.com/110/304313172_54ad33d062_m.jpg }} 

  * 6 voices 
  * 2 DCO's per voice 
  * 2 programmable LFO's with 6 programmable waveforms and sampled modulation.
  * 3 programmable Envelopes with delay, ADSR, and a variety of modulation options.
  * 1 low pass 24 db voltage controlled (Curtis chips) filter per voice with a variety modulation options.
  * 2 Ramps (lag generators) & portamento
  * 5 point tracking/shaper (very cool)
  * 6 voice (12 DCO) unison mode
  * Oscillator hard sync
  * Matrix Modulation

Matrix Modulation allows the user to further apply modulation to one of 20 sources like any one of the envelops, LFOs, ramps, pressure, velocity etc.
to one of 32 destinations like envelope 1 attack, pulse width of one of the DCOs, VCF resonance etc.
With the programmable modulation, the Matrix 1000 can claim itself a digital/analog hybrid modular synth.
With most of my programmer built, sometimes feel like I'm playing with a sophisticated VST... but I'm not. It's real!


So, how does it sound?

...like milk and honey!

The unit ships with 1000 preset patches and It's a shame something that sounds so nice cannot be programmed without the need of patch editing software on a computer. 

====== Design Considerations ======
The Matrix 1000 came with great SYSEX documentation allowing access to almost every voice parameter the unit offered.

Before I started, I purchased a Behringer BCR 2000 MIDI Controller and hacked the firmware to send SYSEX to the Matrix. This gave me a lot of insight  into how the unit responds to messages and how the voice architecture is laid out well before I began designing the control surface.

Using the BCR, I learned first hand about what I had only read about in old [[http://groups.google.com/group/rec.music.makers.synth/browse_thread/thread/2da462e10b611261/80aeb18f8ee20549?lnk=st&q=oberheim+matrix+1000+sysex&rnum=3&hl=en#80aeb18f8ee20549|UseNet postings]] about the Matrix 1000 responding sluggishly to some of the voice parameters... especially modulations that used signed 7 bit values.

For example, if I were to twist a pot from the lowest value, and quickly to the highest value, the SYSEX transmission would flood the Matrix with parameter changes which took more time to process than the time the next message arrived. So, for a few seconds, a note would hang or the voice would stutter as the Matrix finally would stop processing the messages. Obviously, this behavior isn't desirable, especially for live performances. I had to come up with a solution.








===== Getting Around A 20 Year Old Handicap =====
The Matrix uses a Motorola 6809 8-bit microprocessor to process incoming MIDI handle patch changes with the high speed 12-bit DAC. All is not rosy however. 

In the 80's, microprocessor performance was hardly fast at all, and because of this, some parameter changes sent by system exclusive messages produced audible stuttering and note hanging in the analog voices. For some parameters like Matrix Modulation (6bit signed values), note hanging would occur if you rapidly swept values from the lowest to the highest... the hang could last 3 or 4 seconds.

I found this problem documented on the [[http://groups.google.com/group/comp.misc/browse_thread/thread/8d62d9ed92d7e9c9/b87bbaf58d33db43?lnk=st&q=peavey+matrix+1000+note+hanging&rnum=2&hl=en#b87bbaf58d33db43|Usenet posted in 1993]] using a Peavey PC 1600 Midi Controller. Users have tried to get real-time control over the Matrix in the past but could get beyond the  hanging.
 

Not all voice parameters suffered from this problem but I knew I had to find a way to get around the processor intensive parameter edits if I wanted real-time changes with little to no audible artifacts.

Once I identified all the parameters that would choke the synth, I devised a method that would send only the initial value on a pot movement and ignore all other pot movements until it stopped moving for after a fraction of a second. In essence, only the 1st and last values were being sent. This completely solved the the stuttering and hanging. I experienced earlier. 

Some parameters required slightly different delay and this was realized by creating a lookup table containing the configuration values of each and every pot.

	typedef struct s_pots
	{
		const unsigned char description[17];
		const unsigned char params[3];	
		const unsigned char group;		
		const unsigned char mmbus;
		const unsigned char mmsrc;
		const unsigned char mmdest;
		const unsigned char min;
		const unsigned char max;
		const unsigned char valtype;
		const unsigned char update_interval;
		
	}pots;

	const pots PotConfigMap[40] = {
	//	description  	params		group	mmbus	mmsrc	mmdest	  min  max   type	update interval	
	{"DCO FREQUENCY   ", 	{0,10,0},	POTGRP_DCO, MMBUS0,MMSRC0,MMDST0, 40,  88,   SIGNED7, 	1},
	{"DCO LFO1 MOD    ",	{1,11,0},	POTGRP_DCO, MMBUS0,MMSRC0,MMDST0, 0, 	127, SIGNED7, 	5},
	<...>
	
	};

Tha actual values of the pots are never processed until a counter expires when nothing else is happening.

	void Tick(void) __wparam
	{
		unsigned int pot_interval;
			
		// Pots with a high update_interval will transmit their MIDI on the 1st value detected
		// and will stop transmitting while the pot is bein turned. When the pot stops
		// the last known value transmits.
		if(!app_flags.Transmit_Delayed_Pot)
			return;		
		pot_interval = (unsigned int)PotConfigMap[last_ain_pin].update_interval;
		if(PotUpdateCount >= (pot_interval << POT_UPDATE_VECTOR)) {
			app_flags.Transmit_Delayed_Pot  = 0;
			TransmitPot_MIDI(last_ain_pin, last_ain_value);
			PotUpdateCount = 0;
		}
		PotUpdateCount++;
	}


At first, I wanted to have a dedicated knob, slider, switch, button, LED for every parameter available but It didn't take long to realize that a MidiBox couldn't handle that many components without complicating the design with multiple cores.

Early on I though about grouping some components with selector switches... insteading having 3 groups of envelope controls, I would instead have 1 group and 3 switches to select control over one of them but at the time, I wasn't convinced this would look or at least, feel right. 

{{http://www.sweetwater.com/images/items/PhattyTrib.jpg}} 

Sometime in early 2006, Moog came out with the 'Little Fatty', a monophonic digitally controlled analog synth, and after looking closely at photos of the front panel, I realized Moog designed it with cost in mind, but the results were were exactly what I was looking for due to the limits of a one core MidiBox. 


{{http://ai.pricegrabber.com/product_images/16760000-16760999/16760073_125.jpg }}

Later in 2006, Roland released the SH-201 and after close inspection of the front panel, I realized that sharing similar components and switching between then like this not only works great, but also feels great.


I also felt that it was important that the surface components should be grouped by logical component and laid out in linear fashion to represent the signal flow from left to right. 
The idea came from an old Ensoniq ESQ1 I had, where the page buttons were laid out on the right panel of the synth along with a signal flow diagram from the oscillators to the filters and modulation, then finally to the amps.

This layout was not only logical, but helped me understand how the sound is altered before it gets out.

{{http://static.flickr.com/122/304310196_cdabbed01d_m.jpg}}

{{http://static.flickr.com/107/304310217_9072715ab0_m.jpg}}



These are the boards I got from SmashTV. I used them as templates to group the components together. I carefully planned the design and layout of each pot and button on paper before building these. 

{{http://static.flickr.com/116/296585495_fbad3ed8c8_m.jpg}}

http://www.flickr.com/photos/19562549@N00/296585495/

Once the front panel components are built, I mount them onto a cardboard box as a temporary panel surface so I can have them in place while the software gets written.

{{http://static.flickr.com/103/296585480_1ab6bfc7fa_m.jpg}}


====== The Front Panel ======

=== DCO ===

This group is where the DCOs are controlled. Since there are 2, I decided I would share most of the components for both oscillators and page between them  using the 2 buttons up top. The button on the top left selects DCO1 and the controls below only change those of that oscillator. The second button does the same for DCO2.

The knob I'm holding sets the frequency of the DCO. The button to the right of it sets the range of the pot to high(+12 semitones).
This isn't a native feature of the Matrix 1000, but it was something I added to give me better control of the initial pitch.

{{http://static.flickr.com/122/296585477_1b78934796_m.jpg}}

The button, small knob and large knob at the bottom control the DCO1->DCO2 Sync (3 different modes), DCO2 detune, and DCO1<->DCO2 mix.
I also decided to hardware one of the 10 Matrix Modulation buses here for convenience. Just below the frequency pot, I can enable frequency modulation to envelope 3 and adjust its amount with the pot to the right of it. This is very useful for subtle pitch modulation where you want to simulate the attack portion of a hammered piano string, or drift the attack portion of a brass ensemble.

The three buttons on the right of the group enables one of 3 waveforms for the oscillator. On the left enables a pulse wave where its initial width can be changed with the pot below the button and later modulated with LFO 2 with the pot below that.

The button in the middle enables the sawtooth waveform which can be enables simultaneously with the pulse.
The shape of the saw can be altered into an triangle using the pot below.

The button on the far right enables a low frequency transient 'click' on each key stroke. Great for basses and percussive sounds. This waveform doesn't change pitch along with the others.

The pair of lit buttons in the middle enable pitch modulation to either the pitch bender or to vibrato on lever 2 (modulation wheel).


=== VCF ===

The VCF was easy to write software for because the buttons and pots are not multi function except for the LFO modulation enable button which cycles between LFO1, LFO2 and disable.
The LFO modulation is another hardwired Matrix Modulation bus I added for convenience because I like to apply LFO modulation to the cutoff for a variety of of both subtle and dramatic effects.
One of my favorites is to crank up the resonance to near oscillation and modulate the cutoff with a LFO using a random waveform. Prince used this effect on a number of his songs in the 80's with an Oberheim OBX-A.


{{http://static.flickr.com/113/296583884_ff08e82ea4_m.jpg}}

The 4 buttons in the center enable modulation of the filter's cutoff to portamento, keyboard tracking, pitch bender, mod wheel respectively.

=== ENV ===

The 3 envelopes are controlled at the top of this panel and are grouped using the 3 select buttons at the top. The row of pots from left to right are: attack, decay, sustain, release, initial amplitude, amplitude mod by velocity.
Below, the pot controls the delay before the envelope triggers.

{{http://static.flickr.com/99/304310207_48703525d9_m.jpg}}

The buttons control how the envelope is triggered and released. The coolest trigger is the LFO trigger enable. You can get really convincing delays and reverbs using this parameter.

=== LFO ===
There are 2 programmable low frequency oscillators. The controls are on the far right of the panel below. Like the DCO and ENV controls, they 2 LFOs share the same panel components by using a pair of select buttons at the top of the LFO group.
The button on the bottom left toggles between the 7 waveforms and its LED blinks at a rate determined by the current speed of the LFO controlled by the pot on the top left. I had to approximate the blink rate since I have no way of determining the actual cycle rate of the LFO based on its current value. It's pretty close however.


{{http://static.flickr.com/103/304310202_3a01d40557_m.jpg}}




=== Ramps/Portamento ===
{{http://static.flickr.com/106/304310200_e52984a0ee_m.jpg}}


=== Tracking/Shaper ===


=== The Programmer ===
{{http://static.flickr.com/100/309416765_0409bdc582_m.jpg}}

(more to come later)



Flickr Photo Sets:
http://www.flickr.com/photos/19562549@N00/









  
  